const TokenKey = 'Admin-Token';

const tokenStorage = useStorage<null | string>(TokenKey, null);

export const getToken = () => tokenStorage.value;

export const setToken = (access_token: string) => (tokenStorage.value = access_token);

const DataSourceNameKey = 'Admin-DataSourceName';
const dataSourceName = useStorage<null | string>(DataSourceNameKey, null);
export const getDataSourceName = () => dataSourceName.value;
export const setDataSourceName = (datasourcename: string) => (dataSourceName.value = datasourcename);

export const removeToken = () => (tokenStorage.value = null);
